package com.app.micaihu.view.main.mine.fragment;

import com.app.micaihu.R;
import com.app.micaihu.bean.message.MineSetList;
import com.blankj.utilcode.util.LogUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * Created by Guo on 2017/3/17.
 */

public class MineMenuFragmentAdapter extends BaseQuickAdapter<MineSetList, BaseViewHolder> {
    public MineMenuFragmentAdapter(List<MineSetList> list) {
        super(R.layout.item_mine_fragment, list);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, MineSetList mineSetList) {
        baseViewHolder.setImageResource(R.id.iv_icon, mineSetList.itemDrawableId);
        baseViewHolder.setText(R.id.str, mineSetList.itemString);
        if (mineSetList.itemRedDot > 0) {
            baseViewHolder.setVisible(R.id.reddot, true);
        } else {
            baseViewHolder.setGone(R.id.reddot, true);
        }
    }

}
